<?php


namespace app\community\oauth2\Repository;


use app\community\oauth2\Entities\UserEntity;
use League\OAuth2\Server\Entities\ClientEntityInterface;
use League\OAuth2\Server\Repositories\UserRepositoryInterface;

class UserRepository implements UserRepositoryInterface
{

    public function getUserEntityByUserCredentials($username, $password, $grantType, ClientEntityInterface $clientEntity)
    {
        // TODO: Implement getUserEntityByUserCredentials() method.
        return app(UserEntity::class) -> userLogin(
            $username, $password, $clientEntity
        );
    }
}